<?php
	$JO[ "subject"	 ] 	= JO( array( "EN" => "Subject",		"KO" => "제목",		"VI" => "Bài Hát"		) );
	$JO[ "release"	 ] 	= JO( array( "EN" => "Release",		"KO" => "출시",		"VI" => "Phát Hành"		) );
	$JO[ "birth"	 ] 	= JO( array( "EN" => "Birth",		"KO" => "생일",		"VI" => "Ngày Sinh"		) );
	$JO[ "date"		 ] 	= JO( array( "EN" => "Date",		"KO" => "날짜",		"VI" => "Ngày"			) );
	$JO[ "Nation"	 ] 	= JO( array( "EN" => "Nation",							"VI" =>"Quốc Gia"		) );
	$JO[ "Streamthis"] 	= JO( array( "EN"=>"Stream This",						"VI"=>"Nghe Nhạc"		) );
	$JO[ "DownThis"	 ] 	= JO( array( "EN"=>"Download This",						"VI"=>"Tải Về"			) );
	$JO[ "Lyric"	 ] 	= JO( array( "EN"=>"Lyric",								"VI"=>"Lời Bài Hát"		) );
	$JO[ "MusicVideo"] 	= JO( array( "EN"=>"Music Video",						"VI"=>"Phim Ca Nhạc"	) );
	$JO[ "IWantTo" 	 ]	= JO( array( "EN"=>"I want to...",						"VI"=>"Tôi muốn..."		) );
	
	$JO[ "StreamAllchecked" ]	= JO( array( 
		"EN"=>"Stream Every Checked Item",
		"VI"=>"Nghe Tất Cả Các Mục Đã Chọn"
	) );
	
	$JO[ "DownAllChecked" ] 	= JO( array( 
		"EN"=>"Download Every Checked Item",
		"VI"=>"Tải Tất Cả Các Mục Đã Chọn"
	) );
	
	$JO[ "FavoriteAlbum" ] 	= JO( array( 
		"EN"=>"Favorite Album",
		"VI"=>"Album Yêu Thích"
	) );
	
	$JO[ "FavoriteMusic" ] 	= JO( array( 
		"EN"=>"Favorite Music",
		"VI"=>"Bài Hát Yêu Thích"
	) );
	
	$JO[ "Put2favor" ] 			= JO( array( 
		"EN"=>"Put This in My Favorite",
		"VI"=>"Đưa Vào Mục Yêu Thích"
	) );
	
	$JO[ "alert" ] 				= JO( array( 
		"EN"=>"Please check the items that you want to put in your favorite.",
		"VI"=>"Xin hãy chọn bài hát mà bạn muốn đưa vào mục yêu thích."
	) );
	
	$JO[ "PutAll2favor" ]		= JO( array( 
		"EN"=>"Put Every Checked item in My Favorite",
		"VI"=>"Đưa Các Mục Đã Chọn Vào Mục Yêu Thích"
	) );
	
	$JO[ "PutArtist2favorite"] 	= JO(array(
		"EN"=>"Put This Artist to Favorite",
		"VI"=>"Đưa Nghệ Sĩ Vào Mục Yêu Thích"
	) );
	 
	$JO[ "PutAllAlbum2Favorite"]= JO(array(
		"EN"=>"Put Every Album to Favorite",
		"VI"=>"Đưa Tất Cả Các Album Vào Mục Yêu Thích"
	) );
	 	 
	$JO[ "PutAllMusic2favorite"]= JO(array(
		"EN"=>"Put Every Music to Favorite",
		"VI"=>"Đưa Tất Cả Các Bài Hát Vào Mục Yêu Thích"
	) );

	$JO[ "StreamAllAlbum" ]		= JO(array(
		"EN"=>"Stream Every Album",
		"VI"=>"Nghe Tất Cả Album"
	) );
	 
	$JO[ "DownAllAlbum" ]		= JO(array(
		"EN"=>"Download Every Album",
		"VI"=>"Tải Tất Cả Album"
	) );
	
	$JO["StreamAllMusic"] 		= JO(array(
		"EN"=>"Stream Every Music",
		"VI"=>"Nghe Tất Cả Bài Hát"
	) );
	
	$JO["DownAllMusic"]			= JO(array(
		"EN"=>"Download Every Music",
		"VI"=>"Tải Tất Cả Bài Hát"
	) );

	$JO["Share2Face"] 			= JO(array(
		"EN"=>"Share to Facebook",
		"VI"=>"Chia Sẻ Trên Facebook"
	) );
	
	$JO["Share2Twitter" ]		= JO(array(
		"EN"=>"Share to Twitter",
		"VI"=>"Chia Sẻ Trên Twitter"
	) );
	
	$JO["AlbumInfo"]				= JO( array(
		"EN"=>"Album Information",
		"VI"=>"Thông Tin Album"
	) );
	
	$JO["SubjectAlbum"]				= JO( array(
		"EN"=>"Subject",
		"VI"=>"Tên Album"
	) );
	
	$JO["Artist"] 				= JO( array(
		"EN"=>"Artist",
		"VI"=>"Nghệ Sĩ"
	) );
	
	$JO["Genre"]  				= JO( array(
		"EN"=>"Genre",
		"VI"=>"Dòng Nhạc"
	) );
	
	$JO["Release"]				= JO( array(
		"EN"=>"Release",
		"VI"=>"Ngày Phát Hành"
	) );
	
	$JO["Org."]   				= JO( array(
		"EN"=>"Org.",
		"VI"=>"Công Ty"
	) );
	
	$JO["RecommendAlbum"]		=JO( array(
		"EN"=>"Recommendation Album",
		"VI"=>"Album Nên Xem"
	) );
	
	$JO["Phone"]				= JO( array(
		"EN"=>"Phone",
		"VI"=>"Gọi Thoại"
	) );
	
	$JO["WatchAllVideo"] 		= JO( array(
		"EN"=>"Watch Music Video of Every Checked Item",
		"VI"=>"Xem Tất Cả Các Video Đã Chọn"
	) ); 
?>

<?
	$query = "
		SELECT	*,
				`JC_FK_artist.name`(		`artist`		) AS `artist FKF`,
				`JC_FK_organization.name`(	`organization`	) AS `organization FKF`
		FROM	`album`
		WHERE	`key` = '" . $_REQUEST[ "JO_album" ] . "'
	";

	$recordSet = JO_query( $query );

	if( $recordSet -> num_rows ) $record = $recordSet -> fetch_array( );

?>



<script>

	var JO_album_count = Array( );

	function JO_album_checkbox( type ) {

		for( i = 0; i < JO_album_count[ type ]; i ++ ) document.getElementById( "JO_album_checkbox_" + type + "_" + i ).checked = document.getElementById( "JO_album_checkbox_" + type ).checked;

	}

	function JO_album_favorite( type, key_favorite ) {

		key_foreign = "";

		for( i = 0; i < JO_album_count[ type ]; i ++ ) if( document.getElementById( "JO_album_checkbox_" + type + "_" + i ).checked ) key_foreign += document.getElementById( "JO_album_checkbox_" + type + "_" + i ).value + ";";

		if( ! key_foreign ) {

			alert( "<?= $JO[ "alert" ] ?>" );

			return false;

		}

		if( key_favorite ) {

			document.getElementById( "JO_integration_asynchronous" ).src = "JO_05_execution.php?JO_query=favorite_update&JO_favorite_key=" + key_favorite + "&JO_favorite_foreign=" + key_foreign;

		} else {

			document.getElementById( "JO_integration_asynchronous" ).src = "JO_05_execution.php?JO_query=favorite_update&JO_favorite_subject=" + type + "&JO_favorite_type=" + type + "&JO_favorite_foreign=" + key_foreign;

		}

	}

</script>



<div class="JO_unit">

	<h1>Album</h1>

	<div><img src="JO_80_image/JO_00_blank.gif" /></div>

</div>



<div class="JO_relative" style="width: 960px;">



	<div class="JO_left">



		<div class="JO_box_240" style="margin-bottom: 8px;">

			<h1><?= $JO[ "IWantTo" ] ?></h1>

			<a href="#this" class="JO_menu"><?= $JO[ "PutAllAlbum2Favorite" ] ?></a>
			<a href="#this" class="JO_menu"><?= $JO[ "PutAllMusic2favorite" ] ?></a>

			<a href="#this" class="JO_menu"><?= $JO[ "StreamAllMusic"		] ?></a>
			<a href="#this" class="JO_menu"><?= $JO[ "DownAllMusic"			] ?></a>

			<a href="#this" class="JO_menu"><?= $JO[ "Share2Face"			] ?></a>
			<a href="#this" class="JO_menu"><?= $JO[ "Share2Twitter" 		] ?></a>

		</div>



		<div class="JO_box_240" style="margin-bottom: 8px;">

			<h1><?= $JO["AlbumInfo"] ?></h1>

			<div>

				<table style="margin: 4px 4px 4px 0px; width: 216px;">

					<tr>
						<th><?= $JO[ "SubjectAlbum" ] ?></th>
						<td><?= $record[ "subject" ] ?></td>
					</tr>

					<!--<tr>
						<th>Subject</th>
						<td><?= $record[ "content" ] ?></td>
					</tr>-->

					<tr>
						<th><?= $JO[ "Artist" ]  ?></th>
						<td><?

							$temp = explode( "\r\n", $record[ "artist FKF" ] );

							foreach( $temp as $key => $value ) {

								echo "<a href='?JO_artist=" . substr( $value, 0, strpos( $value, ":" ) ) . "'>" . substr( $value, strpos( $value, ":" ) + 2 ) . "</a><br />";

							}

						?></td>
					</tr>

					<tr>
						<th><?= $JO[ "Genre" ] ?></th>
						<td><?= $record[ "genre" ] ?></td>
					</tr>

					<tr>
						<th><?= $JO[ "Release" ] ?></th>
						<td><?= substr( $record[ "release" ], 8, 2 ) ?><span class="JO_gray_40">/</span><?= substr( $record[ "release" ], 5, 2 ) ?><span class="JO_gray_40">/</span><?= substr( $record[ "release" ], 0, 4 ) ?></td>
					</tr>

					<tr>
						<th><?= $JO[ "Nation" ] ?></th>
						<td><?= $record[ "nation" ] ?></td>
					</tr>

					<tr>
						<th><?= $JO[ "Org." ] ?></th>
						<td><?

							$temp = explode( "\r\n", $record[ "organization FKF" ] );

							foreach( $temp as $key => $value ) {

								echo "<a href='?JO_artist=" . substr( $value, 0, strpos( $value, ":" ) ) . "'>" . substr( $value, strpos( $value, ":" ) + 2 ) . "</a><br />";

							}

						?></td>
					</tr>

				</table>

			</div>

			<img style="margin: 4px; width: 24px; height: 72px;" /><img style="margin: 4px; width: 72px; height: 72px;" /><img style="margin: 4px; width: 72px; height: 72px;" /><img style="margin: 4px; width: 24px; height: 72px;" />

		</div>



		<div class="JO_box_240">

			<h1><?= $JO[ "RecommendAlbum" ] ?></h1>

			<img style="margin: 4px; width: 24px; height: 72px;" /><img style="margin: 4px; width: 72px; height: 72px;" /><img style="margin: 4px; width: 72px; height: 72px;" /><img style="margin: 4px; width: 24px; height: 72px;" />

		</div>



	</div>



	<div class="JO_left">

		<div class="JO_bar_720">

			<h1><?= $record[ "subject" ] ?></h1>

			<h2><?= substr( $record[ "release" ], 8, 2 ) ?><span class="JO_gray_60">/</span><?= substr( $record[ "release" ], 5, 2 ) ?><span class="JO_gray_60">/</span><?= substr( $record[ "release" ], 0, 4 ) ?></h2>

			<div>

				<table style="margin: 2px 3px 1px -2px;">

					<tr>



							<!-- Checkbox -->

								<th
									class		= "JO_top"
									style		= "width: 4px;"
								><span
									class		= "JO_relative"
								><input
									type		= "checkbox"
									id			= "JO_album_checkbox_music"
									class		= "JO_checkbox"
									onchange	= "JO_album_checkbox( 'music' );"
								/></span></th>
							
							<!-- Key Bug -->
							<?php if($_SESSION["JO_account_authority"]=="SO"){?>
								<th>Key Bugs</th>
							<?php }?>
								
							<!-- Subject -->

								<th><?= $JO[ "subject" ] ?></th>



							<!-- Artist -->

								<th><?= $JO[ "artist" ] ?></th>



							<!-- Lyric -->

								<th
									style		= "width: 12px;"
								><img
									src			= "JO_80_image/JO_36_icon_lyric_on.png"
									title		= "<?=$JO[ "Lyric" ];?>"
									class		= "JO_icon"
								/></th>



							<!-- Video -->

								<th
									style		= "width: 12px;"
								><a
									href		= "#this"
									title		= "<?= $JO[ "WatchAllVideo" ] ?>"
									onclick		= "alert( 'Becasue of the copy right issue, this is not on the service, yet.' );"
								><img
									src			= "JO_80_image/JO_37_icon_video_off.png"
									class		= "JO_icon"
									onmouseover	= "this.src='JO_80_image/JO_37_icon_video_on.png';"
									onmouseout	= "this.src='JO_80_image/JO_37_icon_video_off.png';"
								/></a></th>



							<!-- Phone -->

								<th
									style		= "width: 12px;"
								><img
									src			= "JO_80_image/JO_33_icon_phone_on.png"
									title		= "<?=$JO["Phone"];?>"
									class		= "JO_icon"
									onmouseover	= "this.src='JO_80_image/JO_33_icon_phone_on.png';"
									onmouseout	= "this.src='JO_80_image/JO_33_icon_phone_off.png';"
								/></th>



							<!-- Stream -->

								<th
									style		= "width: 12px;"
								><a
									href		= "#this"
									title		= "<?= $JO[ "StreamAllchecked" ] ?>"
									onclick		= "alert( 'Becasue of the copy right issue, this is not on the service, yet.' );"
								><img
									src			= "JO_80_image/JO_31_icon_stream_off.png"
									class		= "JO_icon"
									onmouseover	= "this.src='JO_80_image/JO_31_icon_stream_on.png';"
									onmouseout	= "this.src='JO_80_image/JO_31_icon_stream_off.png';"
								/></a></th>



							<!-- Download -->

								<th
									style		= "width: 12px;"
								><a
									href		= "#this"
									title		= "<?= $JO[ "DownAllChecked" ] ?>"
									onclick		= "alert( 'Becasue of the copy right issue, this is not on the service, yet.' );"
								><img
									src			= "JO_80_image/JO_32_icon_download_off.png"
									class		= "JO_icon"
									onmouseover	= "this.src='JO_80_image/JO_32_icon_download_on.png';"
									onmouseout	= "this.src='JO_80_image/JO_32_icon_download_off.png';"
								/></a></th>



							<!-- Favorite -->

								<th style="width: 12px;">

									<span class="JO_relative">

										<div
											id			= "JO_album_favorite_music"
											class		= "JO_select JO_normal"
											style		= "position: absolute; padding: 2px; left: -221px; top: 6px; width: 234px;"
											onmouseover	= "this.style.display = 'block';"
											onmouseout	= "this.style.display = 'none';"
										>

											<img
												src		= "JO_80_image/JO_34_icon_favorite_on.png"
												class	= "JO_icon"
												style	= "position: absolute; left: 220px; top: 4px;"
											/>

											<? if( $_SESSION[ "JO_account_favorite" ][ "music" ] ) foreach( $_SESSION[ "JO_account_favorite" ][ "music" ] as $key => $value ) { ?>

												<a
													href	= "#this"
													class	= "JO_option"
													style	= "width: 221px;"
													onclick	= "
														JO_album_favorite( 'music', '<?= $key ?>' );
														JO_display( 'JO_album_favorite_music' );
													"
												><?= $value ?></a>

											<? } else { ?>

												<a
													href	= "#this"
													class	= "JO_option"
													style	= "width: 221px;"
													onclick	= "
														JO_album_favorite( 'music', '' );
														JO_display( 'JO_album_favorite_music' );
													"
												><?= $JO[ "FavoriteMusic" ] ?></a>

											<? } ?>

										</div>

										<a
											href		= "#this"
											title		= "<?= $JO[ "PutAll2favor" ] ?>"
											onclick		= "document.getElementById( 'JO_album_favorite_music' ).style.display = 'block';"
										><img
											src			= "JO_80_image/JO_34_icon_favorite_off.png"
											class		= "JO_icon"
											onmouseover	= "this.src='JO_80_image/JO_34_icon_favorite_on.png';"
											onmouseout	= "this.src='JO_80_image/JO_34_icon_favorite_off.png';"
										/></a>

									</span>

								</th>



					</tr>

					<?

						$query = "
							SELECT		*,
										`JC_FK_artist.name`( `artist` ) AS `artist FKF`
							FROM		`music`
							WHERE		`delete` IS NULL
							AND			`album` = '" . $_REQUEST[ "JO_album" ] . "'
							ORDER BY	`disc` ASC,
										`track` ASC
						";

						$recordSet = JO_query( $query );

						$count = 0;

						if( $recordSet -> num_rows ) while( $record = $recordSet -> fetch_array( ) ) {

					?>

						<tr>



								<!-- Checkbox -->

									<td><span
										class	= "JO_relative"
									><input
										type	= "checkbox"
										id		= "JO_album_checkbox_music_<?= $count ++ ?>"
										value	= "<?= $record[ "key" ] ?>"
										class	= "JO_checkbox"
									/></span></td>
									
								<!-- Key Bugs -->
								<?php if($_SESSION["JO_account_authority"]=="SO"){?>
									<td><?=$record[ "key_bugs" ];?></td>
								<?php }?>

								<!-- Subject -->

									<td><a href="?JO_album=<?= $record[ "key" ] ?>"><?= $record[ "subject" ] ?></a></td>



								<!-- Artist -->

									<td><?= JO_artist( $record[ "artist FKF" ] ) ?></td>



								<!-- Lyric -->

									<td><a
										href		= "#this"
										title		= "<?= $JO[ "Lyric"	] ?>"
										onclick		= "alert( 'Becasue of the copy right issue, this is not on the service, yet.' );"
									><img
										src			= "JO_80_image/JO_36_icon_lyric_off.png"
										class		= "JO_icon"
										onmouseover	= "this.src='JO_80_image/JO_36_icon_lyric_on.png';"
										onmouseout	= "this.src='JO_80_image/JO_36_icon_lyric_off.png';"
									/></a></td>



								<!-- Video -->

									<td><a
										href		= "#this"
										title		= "<?= $JO[ "MusicVideo" ] ?>"
										onclick		= "alert( 'Becasue of the copy right issue, this is not on the service, yet.' );"
									><img
										src			= "JO_80_image/JO_37_icon_video_off.png"
										class		= "JO_icon"
										onmouseover	= "this.src='JO_80_image/JO_37_icon_video_on.png';"
										onmouseout	= "this.src='JO_80_image/JO_37_icon_video_off.png';"
									/></a></td>



								<!-- Phone -->

									<td><a
										href		= "#this"
										title		= "<?= $JO[ "Phone" ] ?>"
                                                                                onclick		= "document.getElementById('iframe_rbt').src='JO_25_RBT.php?id=<?=$record["key"]?>';setVisible('layer1');"
									><img
										src			= "JO_80_image/JO_33_icon_phone_off.png"
										class		= "JO_icon"
										onmouseover	= "this.src='JO_80_image/JO_33_icon_phone_on.png';"
										onmouseout	= "this.src='JO_80_image/JO_33_icon_phone_off.png';"
									/></a></td>



								<!-- Stream -->

									<td><a
										href		= "#this"
										title		= "<?= $JO[ "Streamthis"] ?>"
										onclick		= "alert( 'Becasue of the copy right issue, this is not on the service, yet.' );"
									><img
										src			= "JO_80_image/JO_31_icon_stream_off.png"
										class		= "JO_icon"
										onmouseover	= "this.src='JO_80_image/JO_31_icon_stream_on.png';"
										onmouseout	= "this.src='JO_80_image/JO_31_icon_stream_off.png';"
									/></a></td>



								<!-- Download -->

									<td><a
										href		= "#this"
										title		= "<?= $JO[ "DownThis" ] ?>"
										onclick		= "alert( 'Becasue of the copy right issue, this is not on the service, yet.' );"
									><img
										src			= "JO_80_image/JO_32_icon_download_off.png"
										class		= "JO_icon"
										onmouseover	= "this.src='JO_80_image/JO_32_icon_download_on.png';"
										onmouseout	= "this.src='JO_80_image/JO_32_icon_download_off.png';"
									/></a></td>



								<!-- Favorite -->

									<td>

										<span class="JO_relative">

											<div
												id			= "JO_album_favorite_music_<?= $record[ "key" ] ?>"
												class		= "JO_select JO_normal"
												style		= "position: absolute; padding: 2px; left: -221px; top: 6px; width: 234px;"
												onmouseover	= "this.style.display = 'block';"
												onmouseout	= "this.style.display = 'none';"
											>

												<img
													src		= "JO_80_image/JO_34_icon_favorite_on.png"
													class	= "JO_icon"
													style	= "position: absolute; left: 220px; top: 4px;"
												/>

												<? if( $_SESSION[ "JO_account_favorite" ][ $type ] ) foreach( $_SESSION[ "JO_account_favorite" ][ $type ] as $key => $value ) { ?>

													<a
														href	= "JO_05_execution.php?JO_query=favorite_update&JO_favorite_key=<?= $key ?>&JO_favorite_foreign=<?= $record[ "key" ] ?>"
														target	= "JO_integration_asynchronous"
														class	= "JO_option"
														style	= "width: 221px;"
														onclick	= "JO_display( 'JO_album_favorite_music_<?= $record[ "key" ] ?>' );"
													><?= $value ?></a>

												<? } else { ?>

													<a
														href	= "JO_05_execution.php?JO_query=favorite_update&JO_favorite_subject=<? urlencode( "Favorite Album" ) ?>&JO_favorite_type=music&JO_favorite_foreign=<?= $record[ "key" ] ?>"
														target	= "JO_integration_asynchronous"
														class	= "JO_option"
														style	= "width: 221px;"
														onclick	= "JO_display( 'JO_album_favorite_music_<?= $record[ "key" ] ?>' );"
													><?= $JO[ "FavoriteAlbum" ] ?></a>

												<? } ?>

											</div>

											<a
												href		= "#this"
												title		= "<?= $JO[ "Put2favor" ] ?>"
												onclick		= "document.getElementById( 'JO_album_favorite_music_<?= $record[ "key" ] ?>' ).style.display = 'block';"
											><img
												src			= "JO_80_image/JO_34_icon_favorite_off.png"
												class		= "JO_icon"
												onmouseover	= "this.src='JO_80_image/JO_34_icon_favorite_on.png';"
												onmouseout	= "this.src='JO_80_image/JO_34_icon_favorite_off.png';"
											/></a>

										</span>

									</td>



						</tr>

					<? } ?>

				</table>



				<script> JO_album_count[ "music" ] = <?= $count ?>; </script>



			</div>

		</div>

	</div>



</div>
<div style="width:100%;height:100%;float:left;position:fixed;left:0px;top:0px;visibility: hidden;z-index: 1;" id="msgpopup">
    <DIV id=layer1>
<!--        <table style="width: 100%">
            <tr><th id="jo_subjecttitle">Subject</th></tr>
        </table>-->
        <SPAN id=close style="top: 4px;right:4px;position: absolute;z-index: 3;">
            <A style="TEXT-DECORATION: none;"
               href="javascript:setVisible('layer1')">
                <img
                    src="JO_80_image/JO_23_icon_delete_off.png" alt=""
                    onmouseover	= "this.src='JO_80_image/JO_23_icon_delete_on.png';"
                    onmouseout="this.src='JO_80_image/JO_23_icon_delete_off.png';"
                />
            </A></SPAN>

        <iframe id="iframe_rbt"
                src="" width="100%"
                height="100%"
                style="position: relative;border: 0px"
                frameborder="0"
                scrolling="no"

                ></iframe>
    </DIV>
</div>

<style type="text/css">
/*
     This script downloaded from www.JavaScriptBank.com
     Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
*/
.jsbank_sample_cont {margin: 20px; padding: 20px;}
.jsbank_sample_tit {font-weight: bold; margin-bottom: 10px; padding: 5px; width: auto; background-color: #c0c0c0; border: 5px solid #a0a0a0; color: black; text-align: center;}
/*
Created by: Jeroen Haan
Web Site: http://www.haan.net/

*/
#layer1 {
	position: relative;
	visibility: hidden;
	width: 440px;
	height: 300px;
	z-index: 2;
	padding: 0px;
        border: 1px solid #000000;
}

#close {
	float: right;
}
</style>
<SCRIPT type="text/javascript">

function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('iframe_rbt').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('iframe_rbt').height=
the_height;
}

x = (screen.width/2);
y = (screen.height/2);
function setVisible(obj)
{
    calcHeight();
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	document.getElementById("msgpopup").style.visibility=obj.style.visibility;
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft = (screen.width/2)-(obj.offsetWidth /2)+52;
	theTop = (screen.height/2)-(obj.offsetHeight/2 )-40;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('layer1')",500);
}
window.onscroll = setTimeout("placeIt('layer1')",500);

</SCRIPT>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              